package com.netty.bytebuf;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

/**
 * @auther: cc.ly
 * @date: 2019/1/5/005
 */

public class Test01 {
    public static void main(String[] args) {
        ByteBuf byteBuf = Unpooled.directBuffer(10);

        for (int i = 0; i < 10; i++) {
            byteBuf.writeByte(i);
        }

        while (byteBuf.isReadable()) {
            System.out.println(byteBuf.readByte());
        }
    }
}
